package com.example.communitypro.mapper;

import com.example.communitypro.pojo.CommunityInformation;
import com.example.communitypro.pojo.Label;
import com.example.communitypro.pojo.LabelRelation;
import com.example.communitypro.pojo.Post;

import java.util.List;

public interface LabelRelationMapper {
    int deleteByPrimaryKey(Integer relationNo);

    int insert(LabelRelation record);

    int insertSelective(LabelRelation record);

    LabelRelation selectByPrimaryKey(Integer relationNo);

    int updateByPrimaryKeySelective(LabelRelation record);

    int updateByPrimaryKey(LabelRelation record);

    int deleteByLabelNo(Integer labelNo);

    int deleteByObNo(Integer obNo);  //删除帖子时调用

    List<Label> selectByOb(int obNo,int obType);  //按热度返回某个对象的所有标签

    LabelRelation judgeLabel(int obNo,int labelNo,int obType);  //判断某对象是否已经添加过某标签

    List<Post> selectPostByLabel(int labelNo);

}